Conversation
asyncpg is a Cython-based PostgreSQL driver; PyPI ships per-interpreter compiled wheels for every arch but riscv64. Build from the upstream tag with cibuildwheel, inheriting upstream's [tool.cibuildwheel] test-command (a real PostgreSQL cluster driven by the full unittest suite, run as a non-root user). The manylinux riscv64 image is Rocky 10, which upstream's install-postgres.sh / install-krb5.sh do not recognise, so before-all installs those packages directly. uvloop is dropped from the test dependency-group: it has no riscv64 wheel at the pinned floor and the suite only imports it when USE_UVLOOP is set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
setuptools 82 removed pkg_resources, which asyncpg's setup.py imports on the cythonise path; pyproject only floors setuptools>=77.0.3, so a fresh build resolves to the breaking version and dies in finalize_options. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
uvloop 0.22.1 — the latest release on PyPI — has riscv64 wheels on pypi.riseproject.dev for cp312/cp313/cp314/cp314t, so there is no need to drop it from upstream's `test` dependency-group and hand-maintain a copy of the remaining requirements. Inherit `test-groups = "test"` unchanged and point pip at our registry instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
.github/workflows/build-asyncpg.yml, building riscv64 wheels forasyncpg 0.31.0.
asyncpg is a Cython-based PostgreSQL driver. PyPI ships per-interpreter
compiled wheels (
cpXY-cpXY, not abi3) for macOS/Windows/manylinuxx86_64+aarch64 and musllinux, but nothing for riscv64.
Shape
Build-from-checkout, mirroring upstream's
release.yml:check out the
v0.31.0tag with submodules (asyncpg/pgproto) and runpypa/cibuildwheel. Everything else —build-frontend,test-groups, theLinux
test-command— is inherited from upstream's[tool.cibuildwheel]inpyproject.tomlunchanged.Testing is upstream's exact invocation: it initdb's a real PostgreSQL cluster
and runs the full
tests/__init__.pyunittest suite as a non-rootapgtestuser, including the flake8/mypy source-quality tests and the Kerberos GSSAPI
auth tests via
k5test. 314 tests on cp312/cp313 and 316 on cp314/cp314t(the extra two are
test_subinterpreters, which needsconcurrent.interpretersfrom 3.14), with 3 skips — all legitimate: Windows-only SSPI auth and two
test__environmentassertions gated onASYNCPG_VERSION/PGVERSION.Each wheel carries three riscv64 extension modules:
asyncpg/pgproto/pgproto,asyncpg/protocol/protocolandasyncpg/protocol/record.riscv64 deviations
Two, both in the cibuildwheel
env::CIBW_BEFORE_ALL_LINUXreplaces upstream'sinstall-postgres.sh+install-krb5.sh. Those scripts branch on/etc/os-releaseIDand onlyknow
debian/ubuntu/almalinux/centos/alpine; themanylinux_2_39_riscv64image is Rocky Linux 10, so they hit the finalelseandexit 1. The replacementdnf installs the same package set andcreates the same
apgtestuser.CIBW_BEFORE_BUILD+CIBW_BUILD_FRONTENDpinsetuptools<82and disablebuild isolation. asyncpg's
setup.pyimportspkg_resourceson thecythonise path, which setuptools 82.0.0 removed;
pyproject.tomlonlyfloors setuptools (
>=77.0.3), so an isolated build resolves to today'slatest and fails with
ModuleNotFoundError: No module named 'pkg_resources'.This is upstream toolchain drift, not arch-specific — it reproduces on x86
and arm64.
CIBW_ENVIRONMENTpoints pip atpypi.riseproject.devso thatuvloop—in upstream's
testdependency-group, and with no riscv64 wheel on publicPyPI — resolves from our registry. The group is otherwise inherited verbatim.